Vue
		.component(
				'form-item',
				{
					props : [ 'ismust', 'cname' ],
					template : '<div class="formItemCon"><div class="leftN"><span class="mustC">{{ismust}}</span>{{cname}}</div><div class="rightI"><slot name="input">input control,ex:input,select,radio, checkbox</slot></div></div>'
				})
Vue.component('form-item2', {
	props : [ 'ismust', 'cname' ],
	template : '#form-item-con'
})

Vue.component('bread_tip', {
	props : [ 'data' ],
	template : '#bread_tip',
	methods : {
		guideNodeClick : function(val1, val2) {
			alert("show " + val1 + "  " + val2);
		}
	}
});

function TreeNode(key, name, tag, submit, leaf, show) {
	this.key = key;
	this.name = name;
	this.tag = tag;
	this.submit = submit;
	this.leaf = leaf;
	this.show = show;
}
Vue.component('node-table-row', {
	props : {
		datas : Array
	},
	template : '#node-table-row',
	methods : {
		on_show_panel : function(val) {
			alert("show " + val);
		},
		on_modify : function(val) {
			alert("modify " + val);
		},
		on_delete : function(val) {
			alert("delete " + val);
		}
	}
})

var nodes = [];
var node = new TreeNode("1x", "2", "3", true, true, true);
nodes.push(node);
node = new TreeNode("11x", "21", "31", true, true, true);
nodes.push(node);

var app = new Vue({
	el : '#app',
	data : {
		message : 'Hello Vue.js!',
		datas : nodes
	}
})

new Vue({
	el : '#app2',
	data : {
		message : 'Hello Vue.js!'
	}
})
var bread_tip_vue = new Vue({
	el : '#nodePath',
	data : {
		sel_data : {
			fatherKey : "1",
			fatherName : "11",
			nodeKey : "2",
			nodeName : "22"
		}
	}
});
function addNode() {
	node = new TreeNode("111x", "211", "311", true, false, true);
	nodes.push(node);
}

function changeNode() {
	var nodes2 = [];
	var node = new TreeNode("a1x", "a2", "a3", true, true, true);
	nodes2.push(node);
	node = new TreeNode("b11x", "b21", "b31", true, true, true);
	nodes2.push(node);
	app.datas = nodes2;
	nodes = nodes2;
}